﻿
using System.Web.Security;
using Stimulus360.Models.Data;
using System.Collections.Generic;
using Stimulus360.Models.Data.CustomTypes;

namespace Stimulus360.Services.Interfaces
{
    public interface IUserService
    {
        /// <summary>
        ///     Method to get User image
        /// </summary>
        /// <param name="userName">
        ///     User whose thumbnail has to be retrieved.
        /// </param>
        /// <returns>
        ///     User Image as byte array
        /// </returns>
        byte[] GetUserThumbnail(string userName);

        /// <summary>
        ///      Method to save User image
        /// </summary>
        /// <param name="userName">
        ///     User whose thumbnail has to be saved.
        /// </param>
        /// <param name="image">
        ///     User Photo to be saved.
        /// </param>
        void SaveUserThumbnail(string userName, byte[] image);

        /// <summary>
        ///     Method to retrive the user by given user name
        /// </summary>
        /// <param name="userName">
        ///     User to be retrieved.
        /// </param>
        /// <returns>
        ///    The User
        /// </returns>
        UserProfile FindByUserName(string userName);

        /// <summary>
        ///     Method to create a new user
        /// </summary>
        /// <param name="user">
        ///     User to be created
        /// </param>
        /// <param name="interests">
        ///     The piped interests string
        /// </param>
        MembershipCreateStatus Create(UserProfile user,string interests);

        /// <summary>
        ///     Method to udpate the User
        /// </summary>
        /// <param name="user">
        ///     User to be updated
        /// </param>
        /// <param name="interests">
        ///     The piped interest string.
        /// </param>
        void Update(UserProfile user, string interests);

        /// <summary>
        ///     Method to retrieve a paginated  set of ideas submitted by the user
        /// </summary>
        /// <param name="userName">
        ///     The User under consideration
        /// </param>
        /// <param name="pageNo">
        ///     The Page number being displayed
        /// </param>
        /// <param name="pageSize">
        ///     The number of ideas shown on a page
        /// </param>
        /// <returns>
        ///     Paginated  set of ideas submitted by the user
        /// </returns>
        PaginatedCollection<Idea> GetSubmittedIdeas(string userName, string pageNo, string pageSize);

        /// <summary>
        ///     Method to retrieve a paginated  set of user's favorite ideas
        /// </summary>
        /// <param name="userName">
        ///     The User under consideration
        /// </param>
        /// <param name="pageNo">
        ///     The Page number being displayed
        /// </param>
        /// <param name="pageSize">
        ///     The number of ideas shown on a page
        /// </param>
        /// <returns>
        ///     Paginated  set of User's favorite ideas
        /// </returns>
        PaginatedCollection<Idea> GetFavoriteIdeas(string userName, string pageNo, string pageSize);

        /// <summary>
        ///     Method to retrieve a paginated  set of ideas recommended by the system based
        ///     on his interests and activities
        /// </summary>
        /// <param name="userName">
        ///     The User under consideration
        /// </param>
        /// <param name="pageNo">
        ///     The Page number being displayed
        /// </param>
        /// <param name="pageSize">
        ///     The number of projects shown on a page
        /// </param>
        /// <returns>
        ///     Paginated  set of ideas recommended by the system based
        ///     on his interests and activities
        /// </returns>
        PaginatedCollection<Idea> GetRecommendedIdeas(string userName, string pageNo, string pageSize);

        /// <summary>
        ///     Method to retrieve a paginated  set of ideas recommended by the system based
        ///     on his interests and activities
        /// </summary>
        /// <param name="userName">
        ///     The User under consideration
        /// </param>
        /// <param name="page">
        ///     The Page number being displayed
        /// </param>
        /// <param name="pageSize">
        ///     The number of ideas shown on a page
        /// </param>
        /// <returns>
        ///     Paginated  set of ideas recommended by the system based
        ///     on his interests and activities
        /// </returns>
        PaginatedCollection<Project> GetVolunteeredProjects(string userName, string page, string pageSize);

        /// <summary>
        ///     Method to retrieve a paginated  set of user's favorite projects
        /// </summary>
        /// <param name="userName">
        ///     The User under consideration
        /// </param>
        /// <param name="page">
        ///     The Page number being displayed
        /// </param>
        /// <param name="pageSize">
        ///     The number of projects shown on a page
        /// </param>
        /// <returns>
        ///     Paginated  set of User's favorite projects
        /// </returns>
        PaginatedCollection<Project> GetFavoriteProjects(string userName, string page, string pageSize);

        /// <summary>
        ///     Method to retrieve a paginated  set of projects recommended by the system based
        ///     on his interests and activities
        /// </summary>
        /// <param name="userName">
        ///     The User under consideration
        /// </param>
        /// <param name="page">
        ///     The Page number being displayed
        /// </param>
        /// <param name="pageSize">
        ///     The number of projects shown on a page
        /// </param>
        /// <returns>
        ///     Paginated  set of projects recommended by the system based
        ///     on his interests and activities
        /// </returns>
        PaginatedCollection<Project> GetRecommendedProjects(string userName, string page, string pageSize);

        /// <summary>
        ///     Method to get a list of all the InvestmentCategorySummaries
        /// </summary>
        /// <returns>
        ///     List of all InvestmentCategorySummaries
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
            Justification = "Method use is appropriate considering complexity and logic http://msdn.microsoft.com/en-us/library/bzwdh01d(VS.71).aspx#cpconpropertyusageguidelinesanchor1")]
        ICollection<InvestmentCategorySummary> GetAllInvestmentCategories();
    }

}
